﻿using Microsoft.AspNet.Identity.EntityFramework;
using System.Data.Entity;
using System.Data.Entity.ModelConfiguration.Conventions;


namespace ESupervision.Models
{
    
    

    public class ApplicationDbContext : IdentityDbContext<ApplicationUser>
    {

        public DbSet<Student> Students { get; set; }
        
        public DbSet<Teacher> Teachers {get; set;}

        public DbSet<AuthorisedStaff> AuthorisedStaffs { get; set; }


        public DbSet<Message> Messages { get; set; }

        public DbSet<MessageRecipient> MessageRecipients { get; set; }

        public DbSet<MessageSent> MessageSents { get; set; }

        public DbSet<Document> Documents { get; set; }

        public DbSet<AttachementFile> AttachmentFiles { get; set; }

        public DbSet<Comment> Comments { get; set; }


        public DbSet<MeetingEvent> MeetingEvents { get; set; }

        public DbSet<MeetingNote> MeetingNotes { get; set; }

        public DbSet<MeetingEventParticipant> MeetingEventParticipants { get; set; }

        public DbSet<ForumReply> ForumReplies { get; set; }


        public DbSet<ForumTopic> ForumTopics { get; set; }

        public ApplicationDbContext()
            : base("ESupervision")
        {

            
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Conventions.Remove<PluralizingTableNameConvention>();

            base.OnModelCreating(modelBuilder);
        }
    }
}